package com.ftwj.demo.modular.entity;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;

import com.ftwj.demo.base.annotation.Column;
import com.ftwj.demo.base.annotation.Ignore;
import com.ftwj.demo.base.annotation.Logic;
import com.ftwj.demo.base.annotation.Order;
import com.ftwj.demo.base.annotation.Primarykey;
import com.ftwj.demo.base.annotation.QueryTable;
import com.ftwj.demo.base.annotation.Table;
import com.ftwj.demo.base.constant.Const;
import com.ftwj.demo.base.constant.QueryModel;
import com.ftwj.demo.utils.validate.ValidateGroupKey;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
*
* <p>Title: DeptBean</p>  
* <p>Description: 描述</p>
* <p>Copyright: Copyright (c) 2020 </p>  
* <p>Company: 兰州飞天网景信息产业有限公司</p>    
* @author WangSli
* @date 2020年04月10日 15:36:09
* @version V1.0
*/
@Data
@Table(name="tb_dept")
@Accessors(chain=true)
@ApiModel(value="DeptBean对象", description="")
public class DeptBean implements Serializable {

	/** serialVersionUID*/ 
	@Ignore
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups=ValidateGroupKey.class)
 	@Primarykey(name="dept_id")
	private Integer deptId;
	@ApiModelProperty(value = "父级部门id(默认:0)")
	private Integer pid;
	@ApiModelProperty(value = "部门名称")
	@QueryTable(model=QueryModel.ALL_LIKE)
	private String name;
	@ApiModelProperty(value = "排序")
	@Order(sort=0,order=Const.ORDER_DESC)
	private Integer sort;
	@ApiModelProperty(value = "备注")
	private String remark;
	@Column(name="create_user")
	@ApiModelProperty(value = "创建人")
	private Integer createUser;
	@Column(name="create_time")
	@Order(sort=1,order=Const.ORDER_DESC)
	@ApiModelProperty(value = "创建时间")
	private Date createTime;
	@ApiModelProperty(value = "状态( 1.正常 ,-1删除 ）")
	@Logic
	private Integer state;
	
}